package asapIs134CK.womi.client.games.logoGame.froggitTheFrog;

import asapIs134CK.womi.client.imgs.logoGame.ActionImageBundle;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.Image;

public enum FroggitAction {
	MoveToRight, MoveToLeft, MoveToTop, MoveToDown, Wait;
	//TODO enable more advanced action set : MoveForward, MoveBackward, TurnClockWise, TurnTrigoWise, Wait
	public String toString() {
		String tostr = "";
		switch (this) {
		case MoveToDown:
			tostr = "Down";
			break;
		case MoveToLeft :
			tostr = "Left";
			break;
		case MoveToRight :
			tostr = "Right";
			break;
		case MoveToTop :
			tostr = "Top";
		default:
			break;
		}
		return tostr;
	};
	
	private static ActionImageBundle imgProvider = 
		(ActionImageBundle) GWT.create(ActionImageBundle.class);
	public Image getGUI(){
		Image img = null;
		switch (this) {
		case MoveToDown:
			img = new Image(imgProvider.arrowDown());
			break;
		case MoveToTop:
			img = new Image(imgProvider.arrowUp());
			break;
		case MoveToLeft:
			img = new Image(imgProvider.arrowLeft());
			break;
		case MoveToRight:
			img = new Image(imgProvider.arrowRight());
			break;
		default:
			break;
		}
		return img;
	}
}
